xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 28 Jul 2009 15:42:12 +0000 (16:42 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 28 Jul 2009 15:42:12 +0000 (16:42 +0100)
commitfb4a420c9b50bbf5ae9ae02141d4eb2857aaa561
tree1ef3b3da5cb628f6e7a7505d0659aff5467a8146
parent0a8f3082f61c46bd1b48b2d8261364bf97f255f1
xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest

xc.test_assign_device(dev) can only tell us if dev is assigned to hvm
guest; if a device is assigned to pv guest, xc.test_assign_device()
still tells us the device is not assigned yet, as a result, the device
still appears in the output of "xm pci-list-assignable-devices", and
xend would not prevent us from assigning the device to a new pv or hvm
guest.

To judge if a device has been assigned to guest, we have to scan
xenstore.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
tools/python/xen/xend/XendConfig.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/XendNode.py
tools/python/xen/xend/server/pciif.py